<!DOCTYPE html>
<html lang="en">
<head>
    <title>导入结果详情</title>
    <meta charset="utf-8">
    <link href="../../layui/css/iconfont/iconfont.css" rel="stylesheet" type="text/css">
    <link href="../../layui/css/layui.css" rel="stylesheet" type="text/css">
    <link href="../../css/style.css" rel="stylesheet" type="text/css">
    <script src="../../layui/layui.js"></script>
    <script src="../../js/jquery-1.8.3.js"></script>
    <script src="../../js/util.js"></script>
    <script type="text/javascript">
        layui.use(['table','jquery','element'],function () {
            var table = layui.table;
            var $=layui.$;
            var batchNumber = getUrlParam("batchNumber");
            //初始化
            $(document).ready(function () {
                $("#batchNumber").html("批次号:" + batchNumber);
                $.ajax({
                    type: 'post',
                    async: false,
                    url: '/artificialRecord/findResult?batchNumber=' + batchNumber,
                    success: function (json) {
                        if (json.code == 0) {
                            var data=json.data;
                            $("#result").html("成功导入:"+data[0]+";失败导入:"+data[1]+";成功发送:"
                            +data[2]+"失败发送:"+data[3]);
                        } else {
                            layer.msg('系统异常，请联系管理员处理!');
                        }
                    }, error: function () {
                        layer.msg('系统异常，请联系管理员处理!');
                    }
                });
            });
            var tableData = {
                elem: "#table",//表格id
                id: "modelReload", //id
                url: '/artificialRecord/detail',
                method: 'post',
                request: {
                    pageName: 'page',
                    limitName: 'limit'
                },
                response: {
                    statusName: 'code',
                    statusCode: 0,
                    msgName: 'msg',
                    countName: 'count',
                    dataName: 'data'
                },
                where: {batchNumber:batchNumber},
                page: true,
                count: "count",
                limit: 10,
                limits: [10, 20, 30, 40, 50],
                layout: ['prev', 'page', 'next'],
                prev: "上一页",
                next: "下一页",
                cols: [[ //表头
                    {field: 'msisdn', title: '手机号码'}
                    , {field: 'sendTime', title: '发送时间'}
                    , {field: 'stateName', title: '导入状态'}
                    , {field: 'sendStateName', title: '发送状态'}
                    , {field: 'remark', title: '说明'}
                ]], done: function (res, curr, count) {
                	console.info(res);
                }
            };
            var index = layer.load(1, {
                shade: [0.1,'#fff'] //0.1透明度的白色背景
            });
            table.render(tableData);
            layer.close(index);

        });
    </script>
</head>
<body>
<div class="layui-content-body">
    <div class="scroll-box">
        <div class="breadcrumb-box">
              <span class="layui-breadcrumb" lay-separator="|">
  <a href="javascript:returnIndex2()">首页&nbsp;</a>
  <a href=""> &nbsp;短信发送管理&nbsp; </a>
  <a href="smsArtificialRecordManage.html"> &nbsp;人工发送短信&nbsp; </a>
  <a href=""> &nbsp;发送结果详情&nbsp; </a>
</span>
        </div>
        <div class="content-box">
            <h4 class="tips-h4"><i class="iconfont icon-xinxi"></i>
                <div id="batchNumber" class="layui-inline"></div>
            </h4>
            <div class="layui-table">
                <div id="result"><br>
                </div>
                <table class="layui-table" id="table">
                </table>
            </div>
        </div>
    </div>
</div>
</body>
</html>